<template>
  <el-form :inline="true" :model="formInline" ref="formInlineRef" size="mini">
    <el-form-item label="角色名称" prop="name">
      <el-input
        v-model="formInline.name"
        placeholder="请输入角色名称"
      ></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="findList" icon="el-icon-search"
        >查询</el-button
      >
      <el-button @click="resetForm" icon="el-icon-refresh">重置</el-button>
      <el-button
        type="primary"
        @click="addDialog"
        icon="el-icon-circle-plus-outline"
        >新增</el-button
      >
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  data() {
    return {
      formInline: {
        name: ''
      },
    };
  },
  methods: {
    // 查询
    findList() {
      this.$emit("findList", this.formInline);
    },
    // 重置
    resetForm() {
      this.$refs.formInlineRef.resetFields();
    },
    // 新增
    addDialog() {
      this.$emit("addDialog", true);
    }
  }
};
</script>

<style scoped></style>
